

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
    <style>
    /* base */
    html,
    body,
    .container {
      width: 100%;
      height: 100%;
    }

    a,
    a:link,
    a:visited {
      text-decoration: none;
      color: inherit;
    }

    ul {
      list-style: none;
    }

    *,
    ::before,
    ::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    *:focus {
      outline: 0;
    }

    .container {
      display: flex;
      padding-top: 20px;
    }

    /* Nav */
    .container .doc-nav {
      position: fixed;
      height: 100%;
      margin: 0 30px 0 40px;
      width: 280px;
    }

    .doc-nav .nav-header {
      display: flex;
      align-items: center;
      box-sizing: border-box;
      background-color: rgb(240, 241, 242);
      height: 40px;
      padding: 16px;
      font-size: 18px;
      font-weight: 500;
      color: rgb(62, 64, 66);
      cursor: pointer;
    }

    .doc-nav .nav-content {
      height: calc(100% - 40px);
      overflow-y: auto;
      color: rgb(32, 34, 36);
    }

    .doc-nav .nav-content .nav-list,
    .doc-nav .nav-content .nav-sub-list {
      line-height: 1.5rem;
    }

    .doc-nav .nav-content .nav-label {
      display: inline-block;
      position: relative;
      padding: 2px 0 2px 20px;
      margin-bottom: 4px;
    }

    .doc-nav .nav-content .nav-sub-label {
      position: relative;
      padding: 2px 0 2px 40px;
      font-size: 14px;
    }

    .doc-nav .nav-content .nav-sub-label:hover {
      text-decoration: underline;
    }

    .doc-nav .nav-content .nav-list .nav-label.group::before {
      border-bottom: 0.25rem solid transparent;
      border-left: 0.25rem solid #6e7072;
      border-right: 0;
      border-top: 0.25rem solid transparent;
      content: '';
      display: block;
      height: 0;
      left: 0.5rem;
      position: absolute;
      top: 0.625rem;
      transition: transform 0.1s linear;
      width: 0;
    }

    .doc-nav .nav-content .nav-list .nav-label.group.active::before {
      transform: rotate(90deg);
    }

    /* doc content */
    .container .doc-content {
      position: fixed;
      height: 100%;
      width: calc(100% - 80px - 40px - 30px - 240px);
      right: 0%;
      overflow-y: auto;
    }

    .doc-title {
      border-bottom: 1px solid #dcdee0;
      font-size: 22px;
      margin: 8px 0 0;
      padding-bottom: 16px;
    }

    .doc-content h3 {
      font-size: 24px;
      font-weight: 600;
      margin: 24px 0;
    }

    .doc-content h4 {
      font-size: 22px;
      font-weight: 500;
      margin: 30px 0 8px;
    }

    .doc-content h4 span {
      color: #007d9c;
    }

    .doc-content .doc-declare {
      background-color: #fafafa;
      border-radius: 5px;
      border: 1px solid #ccc;
      font-size: 14px;
      overflow-x: auto;
      padding: 10px;
      tab-size: 4;
      line-height: 20px;
    }

    .doc-content .doc-comment {
      font-size: 16px;
      margin: 16px 0;
      line-height: 24px;
      word-break: break-word;
    }
  </style>

</head>
<body>
  <div class="container">
    <div class="doc-nav">
      <a href="#Documentation" class="nav-header">Documentation</a>
      <nav class="nav-content">
        <ul class="nav-list">
          <li>
            <a href="#includes" class="nav-label">Includes</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#tuya_cloud_com_defs.h" class="nav-sub-label">tuya_cloud_com_defs.h</a>
              </li>
      

              <li>
                <a href="#uni_log.h" class="nav-sub-label">uni_log.h</a>
              </li>
      

              <li>
                <a href="#ty_cJSON.h" class="nav-sub-label">ty_cJSON.h</a>
              </li>
      

              <li>
                <a href="#tuya_ir_ws_db.h" class="nav-sub-label">tuya_ir_ws_db.h</a>
              </li>
      

              <li>
                <a href="#tuya_ir_code.h" class="nav-sub-label">tuya_ir_code.h</a>
              </li>
      

              <li>
                <a href="#mem_pool.h" class="nav-sub-label">mem_pool.h</a>
              </li>
      

              <li>
                <a href="#tuya_system_dp.h" class="nav-sub-label">tuya_system_dp.h</a>
              </li>
      

              <li>
                <a href="#tuya_iot_com_api.h" class="nav-sub-label">tuya_iot_com_api.h</a>
              </li>
      

              <li>
                <a href="#uni_base64.h" class="nav-sub-label">uni_base64.h</a>
              </li>
      

              <li>
                <a href="#tuya_system_dp.h" class="nav-sub-label">tuya_system_dp.h</a>
              </li>
      

              <li>
                <a href="#tuya_iot_internal_api.h" class="nav-sub-label">tuya_iot_internal_api.h</a>
              </li>
      

              <li>
                <a href="#uni_msg_queue.h" class="nav-sub-label">uni_msg_queue.h</a>
              </li>
      

              <li>
                <a href="#string.h" class="nav-sub-label">string.h</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#macros" class="nav-label">Macros</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#_TUYA_IR_CONTROL_H" class="nav-sub-label">_TUYA_IR_CONTROL_H</a>
              </li>
      

              <li>
                <a href="#TUYA_IR_ATTRIBUTE_REPORT_URL" class="nav-sub-label">TUYA_IR_ATTRIBUTE_REPORT_URL</a>
              </li>
      

              <li>
                <a href="#TUYA_IR_ATTRIBUTE_REPORT_URL_VER" class="nav-sub-label">TUYA_IR_ATTRIBUTE_REPORT_URL_VER</a>
              </li>
      

              <li>
                <a href="#TY_CODE_FASTLZ_VER" class="nav-sub-label">TY_CODE_FASTLZ_VER</a>
              </li>
      

              <li>
                <a href="#IR_MQTT_UP_VER" class="nav-sub-label">IR_MQTT_UP_VER</a>
              </li>
      

              <li>
                <a href="#IR_KEY_MAX_NUM_FASTLZ" class="nav-sub-label">IR_KEY_MAX_NUM_FASTLZ</a>
              </li>
      

              <li>
                <a href="#IR_MQTT_UP_CYCLE_TIME" class="nav-sub-label">IR_MQTT_UP_CYCLE_TIME</a>
              </li>
      

              <li>
                <a href="#IR_MQTT_UP_CYCLE_TYPE" class="nav-sub-label">IR_MQTT_UP_CYCLE_TYPE</a>
              </li>
      

              <li>
                <a href="#IR_MQTT_PUSH_TYPE_BUF_MAX_LEN" class="nav-sub-label">IR_MQTT_PUSH_TYPE_BUF_MAX_LEN</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#functions" class="nav-label">Functions</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#tuya_ir_control_register" class="nav-sub-label">tuya_ir_control_register</a>
              </li>
      

              <li>
                <a href="#tuya_ir_study_code_report" class="nav-sub-label">tuya_ir_study_code_report</a>
              </li>
      

              <li>
                <a href="#tuya_ir_study_error_report" class="nav-sub-label">tuya_ir_study_error_report</a>
              </li>
      

              <li>
                <a href="#tuya_ir_code_free" class="nav-sub-label">tuya_ir_code_free</a>
              </li>
      

              <li>
                <a href="#tuya_ir_study_stat_report" class="nav-sub-label">tuya_ir_study_stat_report</a>
              </li>
      

              <li>
                <a href="#tuya_ir_control_register_v20" class="nav-sub-label">tuya_ir_control_register_v20</a>
              </li>
      

              <li>
                <a href="#tuya_ir_study_fz_compress_report" class="nav-sub-label">tuya_ir_study_fz_compress_report</a>
              </li>
      

              <li>
                <a href="#tuya_ir_lib2timecode" class="nav-sub-label">tuya_ir_lib2timecode</a>
              </li>
      

              <li>
                <a href="#tuya_ir_code_free_v20" class="nav-sub-label">tuya_ir_code_free_v20</a>
              </li>
      

              <li>
                <a href="#tuya_ir_sub_attribute_report" class="nav-sub-label">tuya_ir_sub_attribute_report</a>
              </li>
      

              <li>
                <a href="#tuya_ir_report_ir_attr" class="nav-sub-label">tuya_ir_report_ir_attr</a>
              </li>
      

              <li>
                <a href="#tuya_rf_control_register" class="nav-sub-label">tuya_rf_control_register</a>
              </li>
      

              <li>
                <a href="#tuya_rf_study_code_report" class="nav-sub-label">tuya_rf_study_code_report</a>
              </li>
      

              <li>
                <a href="#tuya_rf_study_stat_report" class="nav-sub-label">tuya_rf_study_stat_report</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#vars" class="nav-label">Vars</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#consts" class="nav-label">Consts</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#types" class="nav-label">Types</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#typedefs" class="nav-label">Typedefs</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#TY_IR_INIT_TYPE" class="nav-sub-label">TY_IR_INIT_TYPE</a>
              </li>
      

              <li>
                <a href="#TY_IR_STUDY_CTL_E" class="nav-sub-label">TY_IR_STUDY_CTL_E</a>
              </li>
      

              <li>
                <a href="#IR_FAST_LZ;
" class="nav-sub-label">IR_FAST_LZ;
</a>
              </li>
      

              <li>
                <a href="#TY_IR_CODE_S;
" class="nav-sub-label">TY_IR_CODE_S;
</a>
              </li>
      

              <li>
                <a href="#TY_IR_STUDY_CTL_CB" class="nav-sub-label">TY_IR_STUDY_CTL_CB</a>
              </li>
      

              <li>
                <a href="#TY_IR_SEND_CB" class="nav-sub-label">TY_IR_SEND_CB</a>
              </li>
      

              <li>
                <a href="#TY_IR_CONTROL_CBS_S;
" class="nav-sub-label">TY_IR_CONTROL_CBS_S;
</a>
              </li>
      

              <li>
                <a href="#TY_IR_GW_ID_S;
" class="nav-sub-label">TY_IR_GW_ID_S;
</a>
              </li>
      

              <li>
                <a href="#TY_IR_GW_KEY_S;
" class="nav-sub-label">TY_IR_GW_KEY_S;
</a>
              </li>
      

              <li>
                <a href="#TY_IR_CODE_HK_S;
" class="nav-sub-label">TY_IR_CODE_HK_S;
</a>
              </li>
      

              <li>
                <a href="#TY_IR_CODE_FZ_S;
" class="nav-sub-label">TY_IR_CODE_FZ_S;
</a>
              </li>
      

              <li>
                <a href="#TY_IR_CODE_HKORFZ_U;
" class="nav-sub-label">TY_IR_CODE_HKORFZ_U;
</a>
              </li>
      

              <li>
                <a href="#TY_IR_CODE_V20_S;
" class="nav-sub-label">TY_IR_CODE_V20_S;
</a>
              </li>
      

              <li>
                <a href="#TY_IR_STUDY_CTL_CB_V20" class="nav-sub-label">TY_IR_STUDY_CTL_CB_V20</a>
              </li>
      

              <li>
                <a href="#TY_IR_SEND_CB_V20" class="nav-sub-label">TY_IR_SEND_CB_V20</a>
              </li>
      

              <li>
                <a href="#TY_IR_COMPRESS_CONTROL_CBS_S;
" class="nav-sub-label">TY_IR_COMPRESS_CONTROL_CBS_S;
</a>
              </li>
      

              <li>
                <a href="#TY_RF_STUDY_CTL_E" class="nav-sub-label">TY_RF_STUDY_CTL_E</a>
              </li>
      

              <li>
                <a href="#TY_RF_SEND_CTL_E" class="nav-sub-label">TY_RF_SEND_CTL_E</a>
              </li>
      

              <li>
                <a href="#TY_RF_STUDY_STATE_CB" class="nav-sub-label">TY_RF_STUDY_STATE_CB</a>
              </li>
      

              <li>
                <a href="#TY_RF_SEND_CB" class="nav-sub-label">TY_RF_SEND_CB</a>
              </li>
      

              <li>
                <a href="#TY_RF_CONTROL_CBS_S;
" class="nav-sub-label">TY_RF_CONTROL_CBS_S;
</a>
              </li>
      
            </ul>
            
          </li>
        </ul>
      </nav>
    </div>
    <div class="doc-content">
      <h2 id="Documentation" class="doc-title">Documentation</h2>
      <h3 id="includes">Includes</h3>
      

      <h4 id="tuya_cloud_com_defs.h"><span>tuya_cloud_com_defs.h</span></h4>
      <pre class="doc-declare"><code>#include "tuya_cloud_com_defs.h"
</code></pre>
      <pre class="doc-comment">#include "tuya_cloud_com_defs.h"
</pre>

      <h4 id="uni_log.h"><span>uni_log.h</span></h4>
      <pre class="doc-declare"><code>#include "uni_log.h"
</code></pre>
      <pre class="doc-comment">#include "uni_log.h"
</pre>

      <h4 id="ty_cJSON.h"><span>ty_cJSON.h</span></h4>
      <pre class="doc-declare"><code>#include "ty_cJSON.h"
</code></pre>
      <pre class="doc-comment">#include "ty_cJSON.h"
</pre>

      <h4 id="tuya_ir_ws_db.h"><span>tuya_ir_ws_db.h</span></h4>
      <pre class="doc-declare"><code>#include "tuya_ir_ws_db.h"
</code></pre>
      <pre class="doc-comment">#include "tuya_ir_ws_db.h"
</pre>

      <h4 id="tuya_ir_code.h"><span>tuya_ir_code.h</span></h4>
      <pre class="doc-declare"><code>#include "tuya_ir_code.h"
</code></pre>
      <pre class="doc-comment">#include "tuya_ir_code.h"
</pre>

      <h4 id="mem_pool.h"><span>mem_pool.h</span></h4>
      <pre class="doc-declare"><code>#include "mem_pool.h"
</code></pre>
      <pre class="doc-comment">#include "mem_pool.h"
</pre>

      <h4 id="tuya_system_dp.h"><span>tuya_system_dp.h</span></h4>
      <pre class="doc-declare"><code>#include "tuya_system_dp.h"
</code></pre>
      <pre class="doc-comment">#include "tuya_system_dp.h"
</pre>

      <h4 id="tuya_iot_com_api.h"><span>tuya_iot_com_api.h</span></h4>
      <pre class="doc-declare"><code>#include "tuya_iot_com_api.h"
</code></pre>
      <pre class="doc-comment">#include "tuya_iot_com_api.h"
</pre>

      <h4 id="uni_base64.h"><span>uni_base64.h</span></h4>
      <pre class="doc-declare"><code>#include "uni_base64.h"
</code></pre>
      <pre class="doc-comment">#include "uni_base64.h"
</pre>

      <h4 id="tuya_system_dp.h"><span>tuya_system_dp.h</span></h4>
      <pre class="doc-declare"><code>#include "tuya_system_dp.h"
</code></pre>
      <pre class="doc-comment">#include "tuya_system_dp.h"
</pre>

      <h4 id="tuya_iot_internal_api.h"><span>tuya_iot_internal_api.h</span></h4>
      <pre class="doc-declare"><code>#include "tuya_iot_internal_api.h"
</code></pre>
      <pre class="doc-comment">#include "tuya_iot_internal_api.h"
</pre>

      <h4 id="uni_msg_queue.h"><span>uni_msg_queue.h</span></h4>
      <pre class="doc-declare"><code>#include "uni_msg_queue.h"
</code></pre>
      <pre class="doc-comment">#include "uni_msg_queue.h"
</pre>

      <h4 id="string.h"><span>string.h</span></h4>
      <pre class="doc-declare"><code>#include "string.h"
</code></pre>
      <pre class="doc-comment">#include "string.h"
</pre>
      <h3 id="macros">Macros</h3>
      

      <h4 id="_TUYA_IR_CONTROL_H">Marco <span>_TUYA_IR_CONTROL_H</span></h4>
      <pre class="doc-declare"><code>#define _TUYA_IR_CONTROL_H
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="TUYA_IR_ATTRIBUTE_REPORT_URL">Marco <span>TUYA_IR_ATTRIBUTE_REPORT_URL</span></h4>
      <pre class="doc-declare"><code>#define TUYA_IR_ATTRIBUTE_REPORT_URL      "tuya.device.infrared.attribute.batch.save"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="TUYA_IR_ATTRIBUTE_REPORT_URL_VER">Marco <span>TUYA_IR_ATTRIBUTE_REPORT_URL_VER</span></h4>
      <pre class="doc-declare"><code>#define TUYA_IR_ATTRIBUTE_REPORT_URL_VER  "1.0"
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="TY_CODE_FASTLZ_VER">Marco <span>TY_CODE_FASTLZ_VER</span></h4>
      <pre class="doc-declare"><code>#define TY_CODE_FASTLZ_VER                3
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="IR_MQTT_UP_VER">Marco <span>IR_MQTT_UP_VER</span></h4>
      <pre class="doc-declare"><code>#define IR_MQTT_UP_VER                    3
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="IR_KEY_MAX_NUM_FASTLZ">Marco <span>IR_KEY_MAX_NUM_FASTLZ</span></h4>
      <pre class="doc-declare"><code>#define IR_KEY_MAX_NUM_FASTLZ             10
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="IR_MQTT_UP_CYCLE_TIME">Marco <span>IR_MQTT_UP_CYCLE_TIME</span></h4>
      <pre class="doc-declare"><code>#define IR_MQTT_UP_CYCLE_TIME             2000       //ms
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="IR_MQTT_UP_CYCLE_TYPE">Marco <span>IR_MQTT_UP_CYCLE_TYPE</span></h4>
      <pre class="doc-declare"><code>#define IR_MQTT_UP_CYCLE_TYPE             TIMER_ONCE //ms
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="IR_MQTT_PUSH_TYPE_BUF_MAX_LEN">Marco <span>IR_MQTT_PUSH_TYPE_BUF_MAX_LEN</span></h4>
      <pre class="doc-declare"><code>#define IR_MQTT_PUSH_TYPE_BUF_MAX_LEN     128
</code></pre>
      <pre class="doc-comment"></pre>
      <h3 id="functions">Functions</h3>
      

      <h4 id="tuya_ir_control_register">Func <span>tuya_ir_control_register</span></h4>
      <pre class="doc-declare"><code>OPERATE_RET tuya_ir_control_register(IN CONST TY_IR_CONTROL_CBS_S *p_ir_cbs);</code></pre>
      <pre class="doc-comment">/**
 * @brief tuya_ir_control_register 
 *
 * @param[in] p_ir_cbs
 *
 * @return OPERATE_RET
 */</pre>

      <h4 id="tuya_ir_study_code_report">Func <span>tuya_ir_study_code_report</span></h4>
      <pre class="doc-declare"><code>OPERATE_RET tuya_ir_study_code_report(IN CONST USHORT_T *p_code, IN CONST UINT_T code_len);</code></pre>
      <pre class="doc-comment">/**
 * @brief tuya_ir_study_code_report 
 *
 * @param[in] p_code
 * @param[in] code_len
 *
 * @return OPERATE_RET
 */</pre>

      <h4 id="tuya_ir_study_error_report">Func <span>tuya_ir_study_error_report</span></h4>
      <pre class="doc-declare"><code>OPERATE_RET tuya_ir_study_error_report(VOID);</code></pre>
      <pre class="doc-comment">/**
 * @brief tuya_ir_study_error_report 
 *
 * @return OPERATE_RET
 */</pre>

      <h4 id="tuya_ir_code_free">Func <span>tuya_ir_code_free</span></h4>
      <pre class="doc-declare"><code>OPERATE_RET tuya_ir_code_free(IN TY_IR_CODE_S *ir_code, IN UCHAR_T code_num);</code></pre>
      <pre class="doc-comment">/**
 * @brief tuya_ir_code_free 
 *
 * @param[in] ir_code
 * @param[in] code_num
 *
 * @return OPERATE_RET
 */</pre>

      <h4 id="tuya_ir_study_stat_report">Func <span>tuya_ir_study_stat_report</span></h4>
      <pre class="doc-declare"><code>OPERATE_RET tuya_ir_study_stat_report(IN TY_IR_STUDY_CTL_E mode);</code></pre>
      <pre class="doc-comment">/**
 * @brief tuya_ir_study_stat_report 
 *
 * @param[in] mode
 *
 * @return OPERATE_RET
 */</pre>

      <h4 id="tuya_ir_control_register_v20">Func <span>tuya_ir_control_register_v20</span></h4>
      <pre class="doc-declare"><code>OPERATE_RET tuya_ir_control_register_v20(IN CONST TY_IR_COMPRESS_CONTROL_CBS_S *p_ir_cbs);</code></pre>
      <pre class="doc-comment">/** 
 * @brief: tuya_ir_control_register_v20
 * @desc: infrared function init v2.0
 *
 * @param[in] p_ir_cbs: callback of infrared emission and studt
 *
 * @return OPERATE_RET
 */</pre>

      <h4 id="tuya_ir_study_fz_compress_report">Func <span>tuya_ir_study_fz_compress_report</span></h4>
      <pre class="doc-declare"><code>OPERATE_RET tuya_ir_study_fz_compress_report(IN CHAR_T *dev_id,IN CONST CHAR_T *p_code, IN CONST UINT_T code_len);</code></pre>
      <pre class="doc-comment">/** 
 * @brief: tuya_ir_study_fz_compress_report
 * @desc: infrared study code compress and report
 *
 * @param[in] p_code: infrared study code
 * @param[in] code_num: length of study code 
 *
 * @return OPERATE_RET
 *
 * @note get the infrared code, compressed by tuya_ir_fastlz_compress(), then used tuya_ir_study_fz_compress_report() to report
 */</pre>

      <h4 id="tuya_ir_lib2timecode">Func <span>tuya_ir_lib2timecode</span></h4>
      <pre class="doc-declare"><code>OPERATE_RET tuya_ir_lib2timecode(IN CHAR_T *head,IN CHAR_T *key,INOUT TY_IR_CODE_S **timecode);</code></pre>
      <pre class="doc-comment">/** 
 * @brief: tuya_ir_lib2timecode
 * @desc: decode the headkey information to the struct of infrared time code
 *
 * @param[in] head: head information
 * @param[in] key: key information
 *
 * @return OPERATE_RET
 *
 * @note timecode need free memory by tuya_ir_code_free()
 */</pre>

      <h4 id="tuya_ir_code_free_v20">Func <span>tuya_ir_code_free_v20</span></h4>
      <pre class="doc-declare"><code>OPERATE_RET tuya_ir_code_free_v20(IN TY_IR_CODE_V20_S *ir_code, IN UCHAR_T code_num);</code></pre>
      <pre class="doc-comment">/** 
 * @brief: tuya_ir_code_free_v20
 * @desc: free the struct of infrared code
 *
 * @param[in] ir_code: point of infrared code struct
 * @param[in] code_num: total of infrared code struct
 *
 * @return OPERATE_RET
 *
 * @note shulule be use the function free memory after infrared emission
 */</pre>

      <h4 id="tuya_ir_sub_attribute_report">Func <span>tuya_ir_sub_attribute_report</span></h4>
      <pre class="doc-declare"><code>OPERATE_RET tuya_ir_sub_attribute_report(IN TY_IR_INIT_TYPE p_type, IN CHAR_T ir_ver, IN CONST CHAR_T *c_devid);</code></pre>
      <pre class="doc-comment">/** 
 * @brief: tuya_ir_sub_attribute_report
 * @desc: Report infrared subdevice properties
 *
 * @param[in] p_type: Infrared coding type
 * @param[in] ir_ver: Infrared version number(default 0x03)
 * @param[in] c_devid: IR child device id
 * @return OPERATE_RET
 */</pre>

      <h4 id="tuya_ir_report_ir_attr">Func <span>tuya_ir_report_ir_attr</span></h4>
      <pre class="doc-declare"><code>OPERATE_RET tuya_ir_report_ir_attr(TY_IR_INIT_TYPE type);</code></pre>
      <pre class="doc-comment">/** 
 * @brief: tuya_ir_report_ir_attr
 * @desc: Report infrared device attribute
 *
 * @param[in] TY_IR_INIT_TYPE: Infrared encode type

 * @return OPERATE_RET
 */</pre>

      <h4 id="tuya_rf_control_register">Func <span>tuya_rf_control_register</span></h4>
      <pre class="doc-declare"><code>OPERATE_RET tuya_rf_control_register(IN CONST TY_RF_CONTROL_CBS_S *p_ir_cbs);</code></pre>
      <pre class="doc-comment">/** 
 * @brief: tuya_rf_control_register
 * @desc: rf function init
 * @param[in]: p_ir_cbs: point of rf cb struct
 * @return: OPERATE_RET
 * @note :none
 */</pre>

      <h4 id="tuya_rf_study_code_report">Func <span>tuya_rf_study_code_report</span></h4>
      <pre class="doc-declare"><code>OPERATE_RET tuya_rf_study_code_report(IN CONST UCHAR_T *p_code,IN CONST UINT_T code_len,IN CONST UINT_T max_len);</code></pre>
      <pre class="doc-comment">/** 
 * @brief: tuya_rf_study_code_report
 * @desc: Report RF learning data
 * @param[in]: p_code: point of rf learn data
 * @param[in]: code_len: Radio frequency learning data length (unit bytes)
 * @param[in]: max_len: point of rf cb struct
 * @return: OPERATE_RET
 * @note :none
 */</pre>

      <h4 id="tuya_rf_study_stat_report">Func <span>tuya_rf_study_stat_report</span></h4>
      <pre class="doc-declare"><code>OPERATE_RET tuya_rf_study_stat_report(IN TY_RF_STUDY_CTL_E mode);</code></pre>
      <pre class="doc-comment">/** 
 * @brief: tuya_rf_study_stat_report
 * @desc: Report radio learning status
 * @param[in]: mode: Radio learning state
 * @return: OPERATE_RET
 * @note :none
 */</pre>
      <h3 id="vars">Vars</h3>
      
      <h3 id="consts">Consts</h3>
      
      <h3 id="types">Types</h3>
      
      <h3 id="typedefs">Typedefs</h3>
      

      <h4 id="TY_IR_INIT_TYPE">Typedef <span>TY_IR_INIT_TYPE</span></h4>
      <pre class="doc-declare"><code>typedef    CHAR_T     TY_IR_INIT_TYPE;
#define   TY_IR_INIT_NO_TYPE          0
#define   TY_IR_INIT_CODE_TYPE        1
#define   TY_IR_INIT_CODE_FASTLZ      2
#define   TY_IR_INIT_CODE_KK          3

</code></pre>
      <pre class="doc-comment">/**
 * @brief define infrared init type
 */</pre>

      <h4 id="TY_IR_STUDY_CTL_E">Typedef <span>TY_IR_STUDY_CTL_E</span></h4>
      <pre class="doc-declare"><code>typedef    CHAR_T     TY_IR_STUDY_CTL_E;
#define   TY_IR_STUDY_START           0
#define   TY_IR_STUDY_EXIT            1

</code></pre>
      <pre class="doc-comment">/**
 * @brief define infrared study state type
 */</pre>

      <h4 id="IR_FAST_LZ;
">Typedef <span>IR_FAST_LZ;
</span></h4>
      <pre class="doc-declare"><code>typedef struct
{
   TY_IR_INIT_TYPE ir_init_type;
   TM_MSG_S *ir_type_sync;
}IR_FAST_LZ;
</code></pre>
      <pre class="doc-comment">/**
 * @brief define IR_FAST_LZ
 */</pre>

      <h4 id="TY_IR_CODE_S;
">Typedef <span>TY_IR_CODE_S;
</span></h4>
      <pre class="doc-declare"><code>typedef struct
{
   USHORT_T   *code;
   USHORT_T   code_len;
   BYTE_T     send_count;    //repeat send count, don't need delay
   UINT_T     feq;
   USHORT_T   delay;         //ms
}TY_IR_CODE_S;
</code></pre>
      <pre class="doc-comment">/**
 * @brief define TY_IR_CODE_S
 */</pre>

      <h4 id="TY_IR_STUDY_CTL_CB">Typedef <span>TY_IR_STUDY_CTL_CB</span></h4>
      <pre class="doc-declare"><code>typedef VOID (*TY_IR_STUDY_CTL_CB)(TY_IR_STUDY_CTL_E mode);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="TY_IR_SEND_CB">Typedef <span>TY_IR_SEND_CB</span></h4>
      <pre class="doc-declare"><code>typedef VOID (*TY_IR_SEND_CB)(TY_IR_CODE_S *ir_code, UCHAR_T code_num_type);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="TY_IR_CONTROL_CBS_S;
">Typedef <span>TY_IR_CONTROL_CBS_S;
</span></h4>
      <pre class="doc-declare"><code>typedef struct
{
   TY_IR_STUDY_CTL_CB study_ctl_cb;
   TY_IR_SEND_CB      send_cb;
}TY_IR_CONTROL_CBS_S;
</code></pre>
      <pre class="doc-comment">/**
 * @brief define TY_IR_CONTROL_CBS_S
 */</pre>

      <h4 id="TY_IR_GW_ID_S;
">Typedef <span>TY_IR_GW_ID_S;
</span></h4>
      <pre class="doc-declare"><code>typedef struct
{
   CHAR_T *devid;
   CHAR_T *vir_devid;
}TY_IR_GW_ID_S;
</code></pre>
      <pre class="doc-comment">/**
 * @brief define TY_IR_GW_ID_S
 */</pre>

      <h4 id="TY_IR_GW_KEY_S;
">Typedef <span>TY_IR_GW_KEY_S;
</span></h4>
      <pre class="doc-declare"><code>typedef struct
{
   UINT_T key_id;
   CHAR_T *key;
}TY_IR_GW_KEY_S;
</code></pre>
      <pre class="doc-comment">/**
 * @brief define TY_IR_GW_KEY_S
 */</pre>

      <h4 id="TY_IR_CODE_HK_S;
">Typedef <span>TY_IR_CODE_HK_S;
</span></h4>
      <pre class="doc-declare"><code>typedef struct
{
   CHAR_T     *ir_head;
   CHAR_T     *ir_key;
}TY_IR_CODE_HK_S;
</code></pre>
      <pre class="doc-comment">/**
 * @brief define TY_IR_CODE_HK_S
 */</pre>

      <h4 id="TY_IR_CODE_FZ_S;
">Typedef <span>TY_IR_CODE_FZ_S;
</span></h4>
      <pre class="doc-declare"><code>typedef struct
{
   CHAR_T     *ir_fzcode;
   USHORT_T   ir_fzcode_len;
   USHORT_T   feq;
   UCHAR_T    send_cnt;
   
}TY_IR_CODE_FZ_S;
</code></pre>
      <pre class="doc-comment">/**
 * @brief define TY_IR_CODE_FZ_S
 */</pre>

      <h4 id="TY_IR_CODE_HKORFZ_U;
">Typedef <span>TY_IR_CODE_HKORFZ_U;
</span></h4>
      <pre class="doc-declare"><code>typedef union
{
   TY_IR_CODE_HK_S    ir_hk_info;
   TY_IR_CODE_FZ_S    ir_fz_info;
}TY_IR_CODE_HKORFZ_U;
</code></pre>
      <pre class="doc-comment">/**
 * @brief define TY_IR_CODE_HKORFZ_U
 */</pre>

      <h4 id="TY_IR_CODE_V20_S;
">Typedef <span>TY_IR_CODE_V20_S;
</span></h4>
      <pre class="doc-declare"><code>typedef struct
{
   TY_IR_CODE_HKORFZ_U ir_code_info;
   CHAR_T     is_fz_code;
   USHORT_T   delay;         //ms
   CHAR_T     relearn;
   TY_IR_GW_KEY_S ir_gw_info_s;
}TY_IR_CODE_V20_S;
</code></pre>
      <pre class="doc-comment">/**
 * @brief define TY_IR_CODE_V20_S
 */</pre>

      <h4 id="TY_IR_STUDY_CTL_CB_V20">Typedef <span>TY_IR_STUDY_CTL_CB_V20</span></h4>
      <pre class="doc-declare"><code>typedef VOID (*TY_IR_STUDY_CTL_CB_V20)(TY_IR_STUDY_CTL_E mode,TY_IR_GW_ID_S *gwid_info);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="TY_IR_SEND_CB_V20">Typedef <span>TY_IR_SEND_CB_V20</span></h4>
      <pre class="doc-declare"><code>typedef VOID (*TY_IR_SEND_CB_V20)(TY_IR_CODE_V20_S *ir_code, UCHAR_T code_num,TY_IR_GW_ID_S *gwid_info);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="TY_IR_COMPRESS_CONTROL_CBS_S;
">Typedef <span>TY_IR_COMPRESS_CONTROL_CBS_S;
</span></h4>
      <pre class="doc-declare"><code>typedef struct
{
   TY_IR_STUDY_CTL_CB_V20          study_ctl_cb;
   TY_IR_SEND_CB_V20               send_cb;
}TY_IR_COMPRESS_CONTROL_CBS_S;
</code></pre>
      <pre class="doc-comment">/**
 * @brief define TY_IR_COMPRESS_CONTROL_CBS_S
 */</pre>

      <h4 id="TY_RF_STUDY_CTL_E">Typedef <span>TY_RF_STUDY_CTL_E</span></h4>
      <pre class="doc-declare"><code>typedef UCHAR_T TY_RF_STUDY_CTL_E;
#define   TY_RF_STUDY_START   0
#define   TY_RF_STUDY_EXIT    1

</code></pre>
      <pre class="doc-comment">/**
 * @brief define TY_RF_STUDY_CTL_E
 */</pre>

      <h4 id="TY_RF_SEND_CTL_E">Typedef <span>TY_RF_SEND_CTL_E</span></h4>
      <pre class="doc-declare"><code>typedef UCHAR_T TY_RF_SEND_CTL_E;
#define   TY_RF_SEND_CONFIG_PKG       0
#define   TY_RF_SEND_PAIR_PKG         1
#define   TY_RF_SEND_CMD_PKG          2
#define   TY_RF_SEND_STUDYCODE_PKG    3

</code></pre>
      <pre class="doc-comment">/**
 * @brief define TY_RF_SEND_CTL_E
 */</pre>

      <h4 id="TY_RF_STUDY_STATE_CB">Typedef <span>TY_RF_STUDY_STATE_CB</span></h4>
      <pre class="doc-declare"><code>typedef VOID (*TY_RF_STUDY_STATE_CB)(TY_RF_STUDY_CTL_E mode);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="TY_RF_SEND_CB">Typedef <span>TY_RF_SEND_CB</span></h4>
      <pre class="doc-declare"><code>typedef VOID (*TY_RF_SEND_CB)(UCHAR_T *rf_data,UCHAR_T rf_data_len,TY_RF_SEND_CTL_E type);
</code></pre>
      <pre class="doc-comment"></pre>

      <h4 id="TY_RF_CONTROL_CBS_S;
">Typedef <span>TY_RF_CONTROL_CBS_S;
</span></h4>
      <pre class="doc-declare"><code>typedef struct
{
   TY_RF_STUDY_STATE_CB   rf_study_state_cb;   //A callback is sent in the RF learning state
   TY_RF_SEND_CB          rf_lib_send_cb;      //A callback is sent in the RF data
}TY_RF_CONTROL_CBS_S;
</code></pre>
      <pre class="doc-comment">/**
 * @brief define TY_RF_CONTROL_CBS_S
 */</pre>
    </div>
  </body>
</html>
            